package com.lovo.pz.role;

import com.lovo.pz.util.GameUtil;

import java.awt.*;

/**
 * 植物面板角色
 * @author 白德柯
 *
 */
public class PlantPanelRole extends BaseRole{
    /** 种子数 */
    private int seedCnt;
    private Font font = new Font("黑体",Font.BOLD,20);
    public PlantPanelRole(Component component){
        super(component);
    }
    @Override
    public void initRole() {
        setRoleX(140);
    }

    @Override
    public void paintRole(Graphics g) {
        g.drawImage(GameUtil.plantsPanelImage,getRoleX(),getRoleY(),getComponent());
        g.setFont(font);
        g.drawString(seedCnt + "",getRoleX() + 25, getRoleY() + 80);
    }

    @Override
    public void action() {

    }

    public int getSeedCnt() {
        return seedCnt;
    }

    public void setSeedCnt(int seedCnt) {
        this.seedCnt = seedCnt;
    }
}
